package edu.cuit.avatar;

import java.io.ByteArrayInputStream;
import java.io.IOException;

/**
 * @author <a href="mailto:1020zhaodan@163.com">Adan</a>
 * @version 1.0
 * @date 2025/7/12 11:21
 */
public class ByteArrayInputStreamTest {
    public static void main(String[] args) {
        byte[] data = "welcome to java!".getBytes();
        try(var input = new ByteArrayInputStream(data)){
            System.out.println(new String(input.readAllBytes()));
        } catch (IOException e){
            e.printStackTrace();
        }
    }
}
